package com.dsjy.yf.address.service;

import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.InputStream;

/**
 * @author whj
 * @version 1.0
 * @date 2021-01-23 11:15
 */
public interface BatchProcessService {
    /**
     * 批处理
     *
     * @param in
     * @param fileName
     * @return
     */
    Workbook batchSplitProcess(InputStream in, String fileName) throws IOException;

    /**
     * 批处理Excel
     *
     * @param in
     * @param fileName
     */
    void processWithExcel(InputStream in, String fileName, HttpServletResponse response);

    /**
     * 批处理CSV
     *
     * @param file
     * @param fileName
     * @param response
     */
    void processWithCsv(MultipartFile file, String fileName, HttpServletResponse response) throws IOException;
}
